﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

/*
 * TO DO:
 * HOMEPAGE AANMAKEN
 * CORRECTE FUNCTIES WEERGEVEN
 */
namespace Gui
{
    public partial class Interface : Form
    {
        int lastPanel;
        
        public Interface()
        {
            InitializeComponent();
        }

        private void buttonHome_Click(object sender, EventArgs e)
        {
            
        }

        private void btnChat_Click(object sender, EventArgs e)
        {
            Chat.Chat chat = new Chat.Chat();
            chat.Show();
        }

        private void btnAgenda_Click(object sender, EventArgs e)
        {     
            loadFunction(1);
        }

        private void btnTakenlijst_Click(object sender, EventArgs e)
        {
            loadFunction(2);
        }

        private void btnFileshare_Click(object sender, EventArgs e)
        {
            loadFunction(3);
        }

        private void loadFunction(int choice)
        {
            int panel = choice;

            switch(panel)
            {
                case 1:                    
                    //zie functies -> agenda + agendapunten
                    panelMain.Controls.Clear();
                    panelMain.Controls.Add(new Functies.Agenda());
                    break;
                case 2:
                    //zie functies -> takenlijst
                    panelMain.Controls.Clear();
                    panelMain.Controls.Add(new Functies.Takenlijst());
                    break;
                case 3:
                    //zie functies -> fileshare
                    panelMain.Controls.Clear();
                    panelMain.Controls.Add(new Functies.Fileshare());
                    break;              
            }
        }
    }
}